from django.urls import path
from django.conf.urls import url

from . import views

app_name = 'polls'

urlpatterns = [

    path('add', views.add, name='add'),
    url(r'^articles/([0-9]{4})/$', views.year_archive),
    url(r'^articles/([0-9]{4})/([0-9]{2})/$', views.month_archive),
    url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', views.article_detail),
    path('', views.IndexView.as_view(), name='首页'),
    path('<int:pk>/', views.DetailView.as_view(), name='详情'),
    path('<int:pk>/results/', views.ResultsView.as_view(), name='结果'),
    path('<int:question_id>/vote/', views.vote, name='投票'),

]
